package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class Load extends AppCompatActivity {

    private EditText personName;
    private EditText password;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_load);


        Button load=(Button)findViewById(R.id.load);
        load.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                personName=(EditText)findViewById(R.id.editTextTextPersonName);
                password=(EditText)findViewById(R.id.editTextTextPassword);


                if ((personName.getText().toString()=="user")&&(password.getText().toString()=="123"))
                {
                    Intent intent=new Intent(Load.this,MainActivity.class);
                    startActivity(intent);

                }


            }
        });

        Button exit=(Button)findViewById(R.id.exit);
        exit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                android.os.Process.killProcess(android.os.Process.myPid());
            }
        });



    }
}